<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="../../plugins/vue/vue.js"></script>
<script  src="../../plugins/axios/axios.min.js"></script>
<link rel="stylesheet" href="../../plugins/element-ui/index.css">
<script src="../../plugins/element-ui/index.js"></script>
<style >
    .el-icon-my-export{
        background: url('../../images/icons/quit.png') center no-repeat;
        font-size: 16px;
    }
    .el-icon-my-export:before{
        content: "替";
        font-size: 16px;
        visibility: hidden;
    }
</style>
<body >

<div id="top" align="right" >
    <h3 style="display:inline;margin-right: 100px;;">欢迎你！{{employeeName}}</h3>
    <el-button  icon="el-icon-my-export" circle style="margin-right: 30px;"  @click="handleClick"></el-button>
</div>

</body>

<script>
    new Vue({
        el:"#top",
        data: {
            employeeName: "",
        },
        created(){
            this.getName();
        },
        methods: {
            handleClick() {
                axios.get("/admin/logout");
                sessionStorage.clear();
              /*  sessionStorage.removeItem("employeeName");
                sessionStorage.removeItem("adminId");*/
                window.parent.location.href="./login.html";
            },
            getName(){
                this.employeeName = sessionStorage.getItem("employeeName");
            }
        }
    })
</script>
</html>